package pme;

public class Add extends Value{
	private double currNum;
 	
	/**
	 * determines the sum of two values
	 * 
	 * @param initVal1 
	 * @param initVal2 
	 */
	public Add(Value initVal1, Value initVal2){
		if (initVal1==null) initVal1= new NullValue();
		if (initVal2==null) initVal2= new NullValue();
		
		currNum = initVal1.evaluate() + initVal2.evaluate();
	}
	

	public double evaluate(){
		return currNum;
	}

}
